<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp"%>

<script type="text/javascript">
$(function(){
	$("#pager").pager({ pagenumber: ${pageIndex}, pagecount: ${pageCount}, buttonClickCallback: PageClick });
});
function PageClick(pageclickednumber) {
    page(pageclickednumber);
}
//分页
function page(clickPage){
		$.ajax({
			type:"GET",
			url:"taBlog.htm",
			data:{'family':${family},'pageIndex':clickPage,'classname':$("#classname").val(),'familyType':$("#familyType").val()},
			success:function(data){
				$("#divBlogList").html(data);
				}
		});
}
//选择日志类别
function getBlogByType(aHref){
	$(".current").removeClass("current");
	var classname=$(aHref).attr("title");
	var familyType=$("#familyType").val();
	$("#divBlogList").load("taBlog.htm?family=${family}&familyType="+$("#familyType").val()+"&classname="+classname);
}

</script>
<div class="h_newNews_box">
	<input type="hidden" name="classname" value="${classname }"
		id="classname" /> <input type="hidden" name="familyType"
		value="${familyType }" id="familyType" />
	<div class="h_newNews_text" id="con_newNews_1" style="display: block;">
		<div class="data_h_newNews_nav" id="divClassType">
			<a href="#" <c:if test="${classname==null}">class='current'</c:if>
				onclick="getBlogByType(this);" title="">全部日志(${allBlogCount })<c:if
					test="${classname==null}"></c:if> </a>
			<c:forEach items="${blogExtList}" var="blogExt">
				 <a href="javascript:void(0)" <c:if test="${classname==blogExt.classname}">class='current'</c:if> onclick="getBlogByType(this);" title="${blogExt.classname }">${blogExt.classLabel }(${blogExt.blogCount})</a>
			</c:forEach>
		</div>

		<div class="clear"></div>
		<c:if test="${ empty bList }">
			<c:if test="${familyType =='friendFamilyType'}">
				<div id="base_info_tip_success" class="success">TA家的邻居还没有发表日志哦！</div>
			</c:if>
			<c:if test="${familyType =='myFamilyType'}">
				<div id="base_info_tip_success" class="success">TA家还没有日志！</div>
			</c:if>
		</c:if>
		<c:if test="${not empty bList}">
			<c:forEach items="${bList}" var="blog">
				<div class="h_logBox">
					<div class="h_logTop">
						<div class="newsList_img2 mr10">
							<div class="own_img">
								<img alt="他的好友" width="58" height="58"
									src="${blog.memberAvatar }">
							</div>
							<div class="others_img">
								<img width="24" height="24" alt="果果街"
									src="${blog.familyAvatar }">
							</div>
						</div>
						<h2>
				<a href="javascript:void(0)" onclick="enterComment('${blog.identifier }')">${blog.subject}</a>
						</h2>
						<div class="h_logTime">
							<span> <fmt:formatDate value="${blog.gmtCreated}"
									pattern="yyyy-MM-dd HH:mm" type="time" timeStyle="full" /> </span> <span>
								<strong>${blog.username}</strong> 发表 </span> <span>分类：${blog.classLabel}</span>
							<span>权限：${blog.visibility} </span>
						</div>
						<div class="clear"></div>
					</div>
					<div class="h_logText">

						<div id="divContent">
							<p>${blog.summeryContent}</p>
						</div>

						<div class="h_logImg"></div>
						<div class="h_logYl">
							<a id="blogReply" href="javascript:void(0)"
								onclick="enterComment('${blog.identifier }')">${blog.replyAmount}条评论</a>
							<%--|<a href="#">赞</a> --%>
						</div>
						<div class="clear"></div>
					</div>
				</div>
			</c:forEach>
		</c:if>
	</div>
</div>
<div class="h_page" id="pager"></div>
